curl --request POST \
--url https://api.evermind.ai/api/v2/memory/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"memory_type": "episode",
"memory_id": "665f0c8e1a2b3c4d5e6f7a8b",
"patch": {
"episode": "The user moved to Hangzhou last month and now lives near West Lake.",
"summary": "Moved to Hangzhou; lives near West Lake.",
"subject": "Relocation to Hangzhou"
},
"reason": {
"code": "wrong_subject",
"note": "The narrative attributed the move to the wrong person"
}
}
'import requests
url = "https://api.evermind.ai/api/v2/memory/update"
payload = {
"memory_type": "episode",
"memory_id": "665f0c8e1a2b3c4d5e6f7a8b",
"patch": {
"episode": "The user moved to Hangzhou last month and now lives near West Lake.",
"summary": "Moved to Hangzhou; lives near West Lake.",
"subject": "Relocation to Hangzhou"
},
"reason": {
"code": "wrong_subject",
"note": "The narrative attributed the move to the wrong person"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
memory_type: 'episode',
memory_id: '665f0c8e1a2b3c4d5e6f7a8b',
patch: {
episode: 'The user moved to Hangzhou last month and now lives near West Lake.',
summary: 'Moved to Hangzhou; lives near West Lake.',
subject: 'Relocation to Hangzhou'
},
reason: {
code: 'wrong_subject',
note: 'The narrative attributed the move to the wrong person'
}
})
};
fetch('https://api.evermind.ai/api/v2/memory/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evermind.ai/api/v2/memory/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'memory_type' => 'episode',
'memory_id' => '665f0c8e1a2b3c4d5e6f7a8b',
'patch' => [
'episode' => 'The user moved to Hangzhou last month and now lives near West Lake.',
'summary' => 'Moved to Hangzhou; lives near West Lake.',
'subject' => 'Relocation to Hangzhou'
],
'reason' => [
'code' => 'wrong_subject',
'note' => 'The narrative attributed the move to the wrong person'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evermind.ai/api/v2/memory/update"
payload := strings.NewReader("{\n \"memory_type\": \"episode\",\n \"memory_id\": \"665f0c8e1a2b3c4d5e6f7a8b\",\n \"patch\": {\n \"episode\": \"The user moved to Hangzhou last month and now lives near West Lake.\",\n \"summary\": \"Moved to Hangzhou; lives near West Lake.\",\n \"subject\": \"Relocation to Hangzhou\"\n },\n \"reason\": {\n \"code\": \"wrong_subject\",\n \"note\": \"The narrative attributed the move to the wrong person\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evermind.ai/api/v2/memory/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"memory_type\": \"episode\",\n \"memory_id\": \"665f0c8e1a2b3c4d5e6f7a8b\",\n \"patch\": {\n \"episode\": \"The user moved to Hangzhou last month and now lives near West Lake.\",\n \"summary\": \"Moved to Hangzhou; lives near West Lake.\",\n \"subject\": \"Relocation to Hangzhou\"\n },\n \"reason\": {\n \"code\": \"wrong_subject\",\n \"note\": \"The narrative attributed the move to the wrong person\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evermind.ai/api/v2/memory/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"memory_type\": \"episode\",\n \"memory_id\": \"665f0c8e1a2b3c4d5e6f7a8b\",\n \"patch\": {\n \"episode\": \"The user moved to Hangzhou last month and now lives near West Lake.\",\n \"summary\": \"Moved to Hangzhou; lives near West Lake.\",\n \"subject\": \"Relocation to Hangzhou\"\n },\n \"reason\": {\n \"code\": \"wrong_subject\",\n \"note\": \"The narrative attributed the move to the wrong person\"\n }\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"data": {
"id": "<string>",
"app_id": "<string>",
"project_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"summary": "<string>",
"subject": "<string>",
"episode": "<string>",
"type": "<string>",
"user_id": "<string>",
"session_id": "<string>",
"sender_ids": [
"<string>"
],
"readable_episode": "<string>",
"atomic_facts": [
{
"id": "<string>",
"content": "<string>"
}
],
"tags": [
"<string>"
],
"edited_at": "2023-11-07T05:31:56Z",
"reflect_state": "pending",
"unchanged": false
}
}{}{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{}{}Edit one memory record [Cloud-only]
Rewrite the editable fields of one memory. Only “episode” can be edited today.
patchuses the episode’s own field names —episode,summary,subject— and needs at least one of them. Fields left out keep their current value.- A patch that changes only
episodemakes the server regeneratesummaryfrom the new text;subjectis never regenerated. - No
app_id/project_id: the record already knows its scope.
There is no version check — the last write wins. Re-sending content equal to what is stored answers 200 with unchanged: true and writes nothing. Changing the narrative re-indexes the memory and re-extracts its facts in the background; the response is the edited record itself, with edited_at and reflect_state set.
A record that does not exist, is already deleted, or belongs to another tenant is rejected with 404.
Profile items are edited through /api/v2/memory/edit, not here.
curl --request POST \
--url https://api.evermind.ai/api/v2/memory/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"memory_type": "episode",
"memory_id": "665f0c8e1a2b3c4d5e6f7a8b",
"patch": {
"episode": "The user moved to Hangzhou last month and now lives near West Lake.",
"summary": "Moved to Hangzhou; lives near West Lake.",
"subject": "Relocation to Hangzhou"
},
"reason": {
"code": "wrong_subject",
"note": "The narrative attributed the move to the wrong person"
}
}
'import requests
url = "https://api.evermind.ai/api/v2/memory/update"
payload = {
"memory_type": "episode",
"memory_id": "665f0c8e1a2b3c4d5e6f7a8b",
"patch": {
"episode": "The user moved to Hangzhou last month and now lives near West Lake.",
"summary": "Moved to Hangzhou; lives near West Lake.",
"subject": "Relocation to Hangzhou"
},
"reason": {
"code": "wrong_subject",
"note": "The narrative attributed the move to the wrong person"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
memory_type: 'episode',
memory_id: '665f0c8e1a2b3c4d5e6f7a8b',
patch: {
episode: 'The user moved to Hangzhou last month and now lives near West Lake.',
summary: 'Moved to Hangzhou; lives near West Lake.',
subject: 'Relocation to Hangzhou'
},
reason: {
code: 'wrong_subject',
note: 'The narrative attributed the move to the wrong person'
}
})
};
fetch('https://api.evermind.ai/api/v2/memory/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evermind.ai/api/v2/memory/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'memory_type' => 'episode',
'memory_id' => '665f0c8e1a2b3c4d5e6f7a8b',
'patch' => [
'episode' => 'The user moved to Hangzhou last month and now lives near West Lake.',
'summary' => 'Moved to Hangzhou; lives near West Lake.',
'subject' => 'Relocation to Hangzhou'
],
'reason' => [
'code' => 'wrong_subject',
'note' => 'The narrative attributed the move to the wrong person'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evermind.ai/api/v2/memory/update"
payload := strings.NewReader("{\n \"memory_type\": \"episode\",\n \"memory_id\": \"665f0c8e1a2b3c4d5e6f7a8b\",\n \"patch\": {\n \"episode\": \"The user moved to Hangzhou last month and now lives near West Lake.\",\n \"summary\": \"Moved to Hangzhou; lives near West Lake.\",\n \"subject\": \"Relocation to Hangzhou\"\n },\n \"reason\": {\n \"code\": \"wrong_subject\",\n \"note\": \"The narrative attributed the move to the wrong person\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evermind.ai/api/v2/memory/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"memory_type\": \"episode\",\n \"memory_id\": \"665f0c8e1a2b3c4d5e6f7a8b\",\n \"patch\": {\n \"episode\": \"The user moved to Hangzhou last month and now lives near West Lake.\",\n \"summary\": \"Moved to Hangzhou; lives near West Lake.\",\n \"subject\": \"Relocation to Hangzhou\"\n },\n \"reason\": {\n \"code\": \"wrong_subject\",\n \"note\": \"The narrative attributed the move to the wrong person\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evermind.ai/api/v2/memory/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"memory_type\": \"episode\",\n \"memory_id\": \"665f0c8e1a2b3c4d5e6f7a8b\",\n \"patch\": {\n \"episode\": \"The user moved to Hangzhou last month and now lives near West Lake.\",\n \"summary\": \"Moved to Hangzhou; lives near West Lake.\",\n \"subject\": \"Relocation to Hangzhou\"\n },\n \"reason\": {\n \"code\": \"wrong_subject\",\n \"note\": \"The narrative attributed the move to the wrong person\"\n }\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"data": {
"id": "<string>",
"app_id": "<string>",
"project_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"summary": "<string>",
"subject": "<string>",
"episode": "<string>",
"type": "<string>",
"user_id": "<string>",
"session_id": "<string>",
"sender_ids": [
"<string>"
],
"readable_episode": "<string>",
"atomic_facts": [
{
"id": "<string>",
"content": "<string>"
}
],
"tags": [
"<string>"
],
"edited_at": "2023-11-07T05:31:56Z",
"reflect_state": "pending",
"unchanged": false
}
}{}{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{}{}Authorizations
API key issued by EverOS, sent as Authorization: Bearer <api_key>.
Body
Edit ONE memory record's editable fields [Cloud-only].
No expected_* / version: the API does no conflict detection (last write wins).
Resend idempotency comes from the no-change short circuit, and Reflection guards
itself with a content CAS.
Kind of the memory being edited. Only "episode" is accepted today.
1The memory's id as returned by /api/v2/memory/get or /search.
1The fields to rewrite — at least one. Fields left out keep their current value.
Show child attributes
Show child attributes
Why the change is made. Optional; recorded for quality analysis and never changes what is written.
Show child attributes
Show child attributes
Was this page helpful?

